package com.cloudbroker.bcs.platform.ltb.bizapi.service.business.wechat.result;

import com.cloudbroker.bcs.common.entity.HSBCPSBackVO;
import com.cloudbroker.bcs.common.util.ValueUtil;
import com.cloudbroker.bcs.platform.ltb.bizapi.service.export.vo.response.GetUserInfoBackVo;

public class UserInfoByCode extends HSBCPSBackVO {
    
    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1L;
    private String open_id;
    private String customer_name;
    private String sex;
    private String province;
    private String city;
    private String country;
    private String headimgurl;
    private String privilege;
    private String errcode;

    public UserInfoByCode() {}
    public UserInfoByCode(GetUserInfoBackVo getUserInfoBackVo) {
        this.open_id = getUserInfoBackVo.getOpenid();
        this.customer_name = getUserInfoBackVo.getNickname();
        this.sex = ValueUtil.getString(getUserInfoBackVo.getSex());
        this.province = getUserInfoBackVo.getProvince();
        this.city = getUserInfoBackVo.getCity();
        this.country = getUserInfoBackVo.getCountry();
        this.headimgurl = getUserInfoBackVo.getHeadimgurl();
        this.errcode = getUserInfoBackVo.getError_no();
        this.error_no = this.errcode;
        this.error_info = getUserInfoBackVo.getError_info();
    }
    
    public String getOpen_id() {
        return open_id;
    }
    
    public void setOpen_id(String open_id) {
        this.open_id = open_id;
    }
    
    public String getCustomer_name() {
        return customer_name;
    }
    
    public void setCustomer_name(String customer_name) {
        this.customer_name = customer_name;
    }
    
    public String getSex() {
        return sex;
    }
    
    public void setSex(String sex) {
        this.sex = sex;
    }
    
    public String getProvince() {
        return province;
    }
    
    public void setProvince(String province) {
        this.province = province;
    }
    
    public String getCountry() {
        return country;
    }
    
    public void setCountry(String country) {
        this.country = country;
    }
    
    public String getHeadimgurl() {
        return headimgurl;
    }
    
    public void setHeadimgurl(String headimgurl) {
        this.headimgurl = headimgurl;
    }
    
    public String getPrivilege() {
        return privilege;
    }
    
    public void setPrivilege(String privilege) {
        this.privilege = privilege;
    }
    
    public String getCity() {
        return city;
    }
    
    public void setCity(String city) {
        this.city = city;
    }
    
    public String getErrcode() {
        return errcode;
    }
    
    public void setErrcode(String errcode) {
        this.errcode = errcode;
    }
    
    @Override
    public String toString() {
        StringBuilder builder = new StringBuilder();
        builder.append("UserInfoByCode [open_id=").append(open_id).append(", alias_name=").append(customer_name)
                .append(", sex=").append(sex).append(", province=").append(province).append(", city=").append(city)
                .append(", country=").append(country).append(", headimgurl=").append(headimgurl)
                .append(", privilege=").append(privilege).append(", errcode=").append(errcode).append("]");
        return builder.toString();
    }
    
}
